Skip to content

Modifed Parse to handle Blank Nodes.#68

Merged
xllora merged 2 commits into
google:masterfrom
apr94:blank_node_support
May 23, 2017
Merged

Modifed Parse to handle Blank Nodes.#68
xllora merged 2 commits into
google:masterfrom
apr94:blank_node_support

Conversation

@apr94
Copy link
Copy Markdown
Contributor

@apr94 apr94 commented May 23, 2017

I did not do too much of error checking in the Parse method since the lexer should check for valid blank nodes.

Copy link
Copy Markdown
Member

@xllora xllora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits.

Comment thread triple/node/node.go Outdated
}
return NewNode(t, id), nil
case underscore:
id := ID(raw[2:len(raw)])
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id := NewID(raw[2:len(raw)]0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread triple/node/node.go Outdated
case underscore:
id := ID(raw[2:len(raw)])
t := Type("/_")
return NewNode(&t, &id), nil
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return NewNode(&t, id), nil

Both changes for consistency with the code below. I would also suggest use NewType.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@apr94
Copy link
Copy Markdown
Contributor Author

apr94 commented May 23, 2017

I have addressed the comments. PTAL, thanks!

@xllora xllora merged commit 0787531 into google:master May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants